#include <iostream>
using namespace std;

class A
{
public:
        int a;
        int b;
        void get()
        {
                cout<<"b = "<<b<<endl;
        }
};

class B : public A
{
public:
        int b;
        int c;
        void get()
        {
                cout<<"b = "<<b<<endl;
        }
};

int main(int argc, char const *argv[])
{
        B b1;
        b1.b = 1; 
        b1.get();

        b1.A::b = 100; //修改父类的b
        b1.B::b = 200; //修改子类的b 默认情况是B
       
        b1.A::get();
        b1.get();
        return 0;
}
